package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "shopping_car")
public class ShoppingCar extends BaseEntity implements Serializable {
    /**
     * 购物车id
     */
    @TableId(value = "SHOPPING_CAR_ID", type = IdType.AUTO)
    private Integer shoppingCarId;

    /**
     * 店铺id
     */
    @TableField(value = "MERCHANT_ID")
    private Integer merchantId;

    /**
     * 商品id
     */
    @TableField(value = "SPU_ID")
    private Integer spuId;

    /**
     * 规格id
     */
    @TableField(value="SKU_ID")
    private Integer skuId;

    /**
     * 商品数量
     */
    @TableField(value = "SPU_COUNT")
    private Integer spuCount;

    /**
     * 加入购物车时间
     */
    @TableField(value = "ADD_SHOPPING_CAR_TIME")
    private Integer addShoppingCarTime;

    /**
     * 状态（0.不删除 -1.删除，2.已失效）
     */
    @TableField(value = "SHOPPING_CAR_SPU_STATUS")
    private Integer shoppingCarSpuStatus;


    private Merchant merchant;

    private Spu spu;

    private Sku sku;

    private static final long serialVersionUID = 1L;

    public static final String COL_SHOPPING_CAR_ID = "SHOPPING_CAR_ID";

    public static final String COL_MERCHANT_ID = "MERCHANT_ID";

    public static final String COL_SPU_ID = "SPU_ID";
    public static final String COL_SKU_ID = "SKU_ID";

    public static final String COL_SPU_COUNT = "SPU_COUNT";

    public static final String COL_ADD_SHOPPING_CAR_TIME = "ADD_SHOPPING_CAR_TIME";

    public static final String COL_SHOPPING_CAR_SPU_STATUS = "SHOPPING_CAR_SPU_STATUS";
}
